<?php
class Studentinfo extends AppModel {

	var $name = 'Studentinfo';
	var $useDbConfig = 'ksmu';
	var $validate = array(
		'passport_ser' => array('notempty'),
		'passport_num' => array('notempty'),
		'passport_data' => array('notempty')
	);

	//The Associations below have been created with all possible keys, those that are not needed can be removed
	var $belongsTo = array(
		'Student' => array(
			'className' => 'Student',
			'foreignKey' => 'student_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'Gender' => array(
			'className' => 'Gender',
			'foreignKey' => 'gender_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'Citizenship' => array(
			'className' => 'Citizenship',
			'foreignKey' => 'citizenship_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'Region' => array(
			'className' => 'Region',
			'foreignKey' => 'region_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'Educationdoctype' => array(
			'className' => 'Educationdoctype',
			'foreignKey' => 'educationdoctype_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'Foreignlanguage' => array(
			'className' => 'Foreignlanguage',
			'foreignKey' => 'foreignlanguage_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		)
	);

	var $hasMany = array(
		'Baby' => array(
			'className' => 'Baby',
			'foreignKey' => 'studentinfo_id',
			'dependent' => false,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'exclusive' => '',
			'finderQuery' => '',
			'counterQuery' => ''
		),
		'Contract' => array(
			'className' => 'Contract',
			'foreignKey' => 'studentinfo_id',
			'dependent' => false,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'exclusive' => '',
			'finderQuery' => '',
			'counterQuery' => ''
		),
		'Mate' => array(
			'className' => 'Mate',
			'foreignKey' => 'studentinfo_id',
			'dependent' => false,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'exclusive' => '',
			'finderQuery' => '',
			'counterQuery' => ''
		),
		'Relative' => array(
			'className' => 'Relative',
			'foreignKey' => 'studentinfo_id',
			'dependent' => false,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'exclusive' => '',
			'finderQuery' => '',
			'counterQuery' => ''
		),
		'Targetingintake' => array(
			'className' => 'Targetingintake',
			'foreignKey' => 'studentinfo_id',
			'dependent' => false,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'exclusive' => '',
			'finderQuery' => '',
			'counterQuery' => ''
		)
	);

	var $hasAndBelongsToMany = array(
		'Privilege' => array(
			'className' => 'Privilege',
			'joinTable' => 'privileges_studentinfos',
			'foreignKey' => 'studentinfo_id',
			'associationForeignKey' => 'privilege_id',
			'unique' => true,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'finderQuery' => '',
			'deleteQuery' => '',
			'insertQuery' => ''
		)
	);

}
?>